test: reference-link with NUL-byte definition url panics subtokenize#209
Open
ChristianMurphy wants to merge 1 commit intowooorm:mainfrom
Open
test: reference-link with NUL-byte definition url panics subtokenize#209ChristianMurphy wants to merge 1 commit intowooorm:mainfrom
ChristianMurphy wants to merge 1 commit intowooorm:mainfrom
Conversation
`to_html_with_options("[][a \n]\n\n[a ]:\0", &Options::default())`
panics in 1.0.0 release at `src/subtokenize.rs:149` with `expected
link`. The 15-byte input is a collapsed-reference link `[][a \n]`
whose label contains a space-newline pair, paired with a definition
`[a ]:` whose url is a single NUL byte. The link-chain consumer
reaches an event whose `link` field is `None` and unconditionally
`expect`s it.
Same panic site as wooormGH-79 (`[](a (a \n))`) but distinct input shape:
this is a collapsed-reference link with NUL-byte url, not an inline
link with a quoted title. The empty `[]` text and the space-newline
in the label are both load-bearing. A single chain-builder integrity
fix in `src/construct/label_end.rs` likely closes both shapes
together.
Verified to fail against `markdown = "=1.0.0"` in release. Found via
in-tree fuzzing campaign.
Related-to: wooormGH-79.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
to_html_with_options("[][a \n]\n\n[a ]:\0", &Options::default())panics in 1.0.0 release atsrc/subtokenize.rs:149withexpected link. The 15-byte input is a collapsed-reference link[][a \n]whose label contains a space-newline pair, paired with a definition[a ]:whose url is a single NUL byte. The link-chain consumer reaches an event whoselinkfield isNoneand unconditionallyexpects it.Same panic site as GH-79 (
[](a (a \n))) but distinct input shape: this is a collapsed-reference link with NUL-byte url, not an inline link with a quoted title. The empty[]text and the space-newline in the label are both load-bearing. A single chain-builder integrity fix insrc/construct/label_end.rslikely closes both shapes together.Verified to fail against
markdown = "=1.0.0"in release. Found via in-tree fuzzing campaign.Related-to: GH-79.